<!DOCTYPE html>
<html>
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    function sum(first, ...args) {
      console.log(first);   // 10
      console.log(args);    // [20, 30]
    }
    sum(10, 20, 30);
  </script>
</body>
</html>